﻿using System;
using System.Runtime.Serialization;

namespace NativeCode.Web.Controls
{
	[DataContract]
	[Serializable]
	public class CheckBoxSelectorItem
	{
		[DataMember]
		public string ControlId { get; set; }

		[DataMember]
		public bool Checked { get; set; }

		[DataMember]
		public string Label { get; set; }

		[DataMember]
		public string LabelFormat { get; set; }

		public string LabelText
		{
			get { return !string.IsNullOrEmpty(LabelFormat) ? string.Format(LabelFormat, Label) : Label; }
		}

		[DataMember]
		public string ToolTip { get; set; }

		[DataMember]
		public string ToolTipFormat { get; set; }

		public string ToolTipText
		{
			get { return !string.IsNullOrEmpty(ToolTipFormat) ? string.Format(ToolTipFormat, ToolTip) : ToolTip; }
		}

		[DataMember]
		public string Value { get; set; }

		[DataMember]
		public string ValueFormat { get; set; }

		public string ValueText
		{
			get { return !string.IsNullOrEmpty(ValueFormat) ? string.Format(ValueFormat, Value) : Value; }
		}
	}
}